package com.sendtion.xrichtextdemo.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * CommonUtil
 *
 * @since 2021-06-22
 */
public class CommonUtil {
    /**
     * date2string
     *
     * @param date
     * @return String
     */
    public static String date2string(Date date) {
        String strDate = "";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        strDate = sdf.format(date);
        return strDate;
    }
}
